<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddColTypeToVipRuleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('vip_rule', function (Blueprint $table) {
            $table->string('type')->nullable()->comment('global_vip 全局vip / classify_vip 分类vip')->after('money');
            $table->integer('classify_id')->default(0)->comment('vip分类的id')->after('type');
        });

        Schema::table('user_vip', function (Blueprint $table) {
            $table->string('type')->nullable()->comment('global_vip 全局vip / classify_vip 分类vip')->after('end_time');
            $table->integer('classify_id')->default(0)->comment('vip分类的id')->after('type');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
